import 'package:json_annotation/json_annotation.dart';

part 'locus_data.g.dart';

@JsonSerializable()
class LocusPageData {
  int? total;
  List<LocusModle>? list;
  LocusPageData();

  factory LocusPageData.fromJson(Map<String, dynamic> json) =>
      _$LocusPageDataFromJson(json);
  Map<String, dynamic> toJson() => _$LocusPageDataToJson(this);
}

@JsonSerializable()
class LocusModle {
  int? user_id;
  int? ebike_id;
  String? start_name;
  String? end_name;
  Corrdinate? start_coordinate;
  Corrdinate? end_coordinate;
  List<Corrdinate>? track_list;
  int? start_time;
  int? end_time;
  int? mileage;
  int? avg_speed;
  int? max_speed;
  String? city;
  int? created_at;
  int? updated_at;
  LocusModle();

  factory LocusModle.fromJson(Map<String, dynamic> json) =>
      _$LocusModleFromJson(json);
  Map<String, dynamic> toJson() => _$LocusModleToJson(this);
}

@JsonSerializable()
class Corrdinate {
  double? lng;
  double? lat;
  int? t;
  double? s;
  double? b;
  Corrdinate();

  factory Corrdinate.fromJson(Map<String, dynamic> json) =>
      _$CorrdinateFromJson(json);
  Map<String, dynamic> toJson() => _$CorrdinateToJson(this);
}
